<template>
  <div>
    <header-nav :index_num="index_num"></header-nav>
    <div class="content">
      <!-- <div class="top">
        <div class="homeicon">
          <img src="../../static/img/homeicon.png" alt class="homeicon" />
        </div>
        <div class="el-icon-right"></div>
        <div class="titleshot">社会组织信息</div>
      </div> -->
      <!-- <img @click="navto()" src="../../static/img/apple.png" alt class="apply" /> -->
      <div class="infobox">
        <div class="infotablebg">
          <div class="infotable">
            <div class="tabletitle">社会组织信息</div>
            <table width=1089>
              <!-- <tr>
<th class="tabletitle">社会组织信息</th>
              </tr>-->

              <tr>
                <td class="key">社会组织名称</td>
                <td class="val" :title="result.name?result.name:'无'"><div style="width:266px;margin:0 auto;white-space: nowrap;text-overflow: ellipsis;overflow: hidden;">{{result.name?result.name:"无"}}</div></td>
                <td class="key">组织状态</td>
                <td class="val" v-if="result.status==1">信用良好</td>
                <td class="val" v-else-if="result.status==-1">严重违法失信</td>
                <td class="val" v-else>活动异常</td>
               <!-- <td class="val" v-if="result.status==0">已注销</td>
                <td class="val" v-if="result.status==2">正常</td>
                <td class="val" v-if="result.status==3">待审核</td> -->
              </tr>
              <tr>
                <td class="key">统一社会信用代码</td>
                <td class="val">{{result.unicode?result.unicode:"无"}}</td>
                <td class="key">注册地址</td>
                <td class="val" :title="result.reg_area"><div style="width:266px;margin:0 auto;white-space: nowrap;text-overflow: ellipsis;overflow: hidden;">{{result.reg_area?result.reg_area:"无"}}</div></td>
              </tr>
              <tr>
                <td class="key">社会组织类型</td>
                <td class="val">{{result.society_type == 0?"民办非企业单位":"社会团体"}}</td>
                <td class="key">法定代表人</td>
                <td class="val">{{result.legal_person?result.legal_person:"无"}}</td>
              </tr>
              <tr>
                <td class="key">业务主管单位</td>
                <td class="val" :title="result.supervisor"><div style="width:266px;margin:0 auto;white-space: nowrap;text-overflow: ellipsis;overflow: hidden;">{{result.supervisor?result.supervisor:"无"}}</div></td>
                <td class="key">开办资金</td>
                <td class="val">{{result.money?result.money:"无"}}</td>
              </tr>
              <tr>
                <td class="key">登记日期</td>
                <td class="val">{{result.reg_time?result.reg_time:"无"}}</td>
                <td class="key">有效期限</td>
                <td class="val">{{result.start_time}}--{{result.end_time}}</td>
              </tr>
              <tr>
                 <td class="key">行政处罚情况</td>
                <td class="val">{{result.admini_punish?result.admini_punish:"无"}}</td>
                <!-- <td class="key">年检情况</td>
                <td class="val">{{result.sec_age?result.sec_age:"无"}}</td> -->
                <td class="key">评估情况</td>
                <td class="val">{{result.assess?result.assess:"无"}}</td>
              </tr>
              <tr>
                <td class="key">
                  <div style="width:100%;margin:0 auto;white-space: nowrap;text-overflow: ellipsis;overflow: hidden;">承接政府购买服务情况</div>
                </td>
                <td class="val">
                  <div>{{result.accept_buy?result.accept_buy:"无"}}</div>
                </td>
                <td class="key">
                  <div style="width:100%;margin:0 auto;text-align:center">接受表彰情况</div>
                </td>
                <td class="val">
                  <p class="valwrap">{{result.accept_honor?result.accept_honor:"无"}}</p>
                </td>
              </tr>

              <tr>
               
                <td class="key">活动异常情况</td>
                <td class="val">{{result.activity_unusual?result.activity_unusual:"无"}}</td>
                 <td class="key">
                  <div>活动异常情况时限</div>
                </td>
                <td class="val">
                  <p>{{result.activity_unusual_start}}--{{result.activity_unusual_end}}</p>
                </td>
              </tr>
              <tr>
             
                <td class="key">
                  <p>严重失信情况</p>
                </td>
                <td class="val">
                  <div>{{result.break_faith?result.break_faith:"无"}}</div>
                </td>
                 <td class="key">严重失信情况时限</td>
                <td class="valself" style="text-align:center">{{result.break_faith_start}}--{{result.break_faith_end}}</td>
              </tr>
            </table>
            <table width=1089>
                <tr>
                <td class="key key1" style="display:table-cell; vertical-align:middle;">
                  <div>年检情况</div>
                </td>
                <td class="valself">
                  <div v-for="(item,index) in result.year" :key="index" style="margin-lft:20px;float:left">{{item.year}}年年检:{{item.status=='1'?'已通过':'未通过'}}</div>
                  <!-- <div>{{result.sec_age?result.sec_age:"无"}}</div> -->
                </td>
              </tr>
              <tr>
                <td class="key key1" style="display:table-cell; vertical-align:middle">业务范围</td>
                <td class="valself">{{result.business?result.business:"无"}}</td>
              </tr>
              <tr>
                <td class="key key1" style="display:table-cell; vertical-align:middle;">
                  <div>变更信息</div>
                </td>
                <td class="valself">
                  <div>{{result.change_info?result.change_info:"无"}}</div>
                </td>
              </tr>
              
             
            </table>
          </div>
        </div>
      </div>
    </div>
    <footer-nav class="footer"></footer-nav>
  </div>
</template>

<script>
import HeaderNav from "../components/HeaderNav";
import FooterNav from "../components/FooterNav";
export default {
  name: "dangzuzhixq",
  components: {
    HeaderNav,
    FooterNav
  },
  data() {
    return {
      index_num: 1,
      result: []
    };
  },
  mounted() {
    console.log(this.$route.query.id);
    this.$http({
      method: "get",
      url: "v1/soc/credit",
      params: { id: this.$route.query.id }
    }).then(res => {
      console.log(res,'房间里卡什么地方撒');
      this.result = res.data.data;
    });
  },
  methods:{
    navto(){
      this.$router.push({path:"/personalZte"})
    }
  }
};
</script>

<style lang="scss" scoped>
.key1{
  width:225px!important
}
.infobox {
  width: 100vw;
  display: flex;
  justify-content: center;
}
.el-icon-s-home {
  color: #9a9899;
  font-size: 20px;
}
.content {
  background-color: #f5f5f5;
  .top {
    width: 178px;
    position: relative;
    top: 50px;
    left: 70px;
    display: flex;
    justify-content: space-around;
    .titleshot {
      font-size: 20px;
      // font-weight: bold;
    }
    .homeicon {
      width: 22px;
      height: 22px;
    }
  }
  .apply {
    width: 233px;
    float: right;
    margin-right: 71px;
  }
  .infotablebg {
    width: 1200px;
    background-color: white;
    // margin: 0 auto;
    // margin-top: 67px;
    display: flex;
    justify-content: center;
    padding-bottom: 180px;
    margin-top: 42px;
    .infotable {
      margin-top: 36px;
      .tabletitle {
        background-color: #f24e77;
        width: 1089px;
        height: 60px;
        color: white;
        text-align: center;
        line-height: 60px;
        font-size: 24px;
      }
      .key {
        width: 400px;
        height: 40px;
        line-height: 40px;
        background-color: #f7f5f6;
        text-align: center;
      }
      .keywrap {
        width: 114px;
        margin: 0 auto;
        line-height: 35px;
        text-indent: -1px;
        text-align: left;
        margin-right: 112px;
      }
      .valwrap {
        // line-height: 50px;
        position: relative;
      }
      .valself {
        width: 802px;
        height: 40px;
        line-height: 40px;
        text-align: left;
        text-indent: 30px;
      }
      .val {
        width: 266px;
        height: 40px;
        line-height: 40px;
        overflow: hidden;
      }
    }
  }
}
</style>
<style>
body table td {
  border: 2px solid #dfe0eb !important;
}
</style>